# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Philipp Schmidt <philschmidt at gmx dot net>
# Contributor: Stefan Tatschner <stefan.tatschner at gmail dot com>

pkgname=python-blinker
pkgver=1.6.3
pkgrel=1
pkgdesc="Fast, simple object-to-object and broadcast signaling"
arch=('any')
url="https://blinker.readthedocs.io"
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-installer' 'python-flit-core')
checkdepends=('python-pytest-asyncio')
source=("https://files.pythonhosted.org/packages/source/b/blinker/blinker-$pkgver.tar.gz")
sha512sums=('2b68751246ac084a97491a360496971416564f21cae909799e2942e915fbee1c6399e43aaa6391cadcdd87f57340013b3a894afa2e9b5dc156baa1245c4928b9')

build() {
  cd blinker-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd blinker-$pkgver
  PYTHONPATH="$PWD"/src \
    python -m pytest
}

package() {
  cd blinker-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl 
  install -Dm644 LICENSE.rst -t "$pkgdir"/usr/share/licenses/$pkgname/
}
